<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
if($_RQ['op']=='basic'){
	$values = array(
		array('title'=>'合同编号','key'=>'hetongsn'),
		array('title'=>'个人签署区','key'=>'signer1'),
		array('title'=>'公司签署区','key'=>'signer2'),
		array('title'=>'用户名称','key'=>'name'),
		array('title'=>'身份证号','key'=>'code'),
		array('title'=>'用户手机','key'=>'mobile'),
		array('title'=>'用户地址','key'=>'address'),
		array('title'=>'订单编号','key'=>'order_sn'),
		array('title'=>'电子邮箱','key'=>'email'),
		array('title'=>'设备名称','key'=>'goods_name'),
		array('title'=>'套餐名称','key'=>'taocan_name'),
		array('title'=>'商品详情','key'=>'goods_desc'),
		array('title'=>'品牌','key'=>'goods_brand'),
		array('title'=>'型号','key'=>'goods_optiontitle'),
		array('title'=>'设备数量','key'=>'goods_total'),
		array('title'=>'租期','key'=>'zuqi'),
		array('title'=>'总租金','key'=>'goods_totalzu'),
		array('title'=>'商品押金','key'=>'goods_price'),
		array('title'=>'已付押金','key'=>'jsyafee'),
	);
	$item['values']=$values;
	$basic=$this->plugin_setting('basic');
	$qinum=$basic['qinum']?:12;
	$qivalues=array();
	for($i=1;$i<=$qinum;$i++){
		$qivalues[]=array(
			'title'=>'第'.$i.'期',
			'zqkey'=>'zqkey'.$i,
			'zjkey'=>'zjkey'.$i,
			'zjfkey'=>'zjfkey'.$i,
			'mdkey'=>'mdkey'.$i,
		);
	}
	$item['qivalues']=$qivalues;
	$return['item']=$item;
	$htmls=array(
		'type'=>'look',
		'desc'=>'合并模板控件编码字典',
		'look'=>array(
			array('type'=>'tip','title'=>'
			1、基本设置--合同期数（默认12期）；
			</br>2、移步https://web.esign.cn/templates-manage/manage：编辑模板--控件编码:高级配置--勾选使用高级服务--就会显示控件编码
			</br>3、租金，买断价，要选用文本控件；要么就用小数点的控件；
			'
			),
			array(
				'type'=>'array',
				'name'=>'values',
				'title'=>'控件列表',
				'list'=>array(
					array('type'=>'string','name'=>'title','title'=>'控件名称'),
					array('type'=>'string','name'=>'key','title'=>'控件编码'),				
				),
			),
			array(
				'type'=>'array',
				'name'=>'qivalues',
				'title'=>'合同期数列表',
				'list'=>array(
					array('type'=>'string','name'=>'title','title'=>'租期'),	
					array('type'=>'string','name'=>'zqkey','title'=>'租期编码'),	
					array('type'=>'string','name'=>'zjkey','title'=>'租金编码'),
					array('type'=>'string','name'=>'zjfkey','title'=>'租金付款日编码'),
					array('type'=>'string','name'=>'mdkey','title'=>'买断价编码'),						
				),
			)
		),
	);
	$return['htmls']=$htmls;
	exi($return);
}
/*******basic*******/
/*******op*******/
